package com.suse.lhw.resourceservere.client;

import com.suse.lhw.hms.exersiseserver.domin.EPackage;
import com.suse.lhw.hms.exersiseserver.pojo.out.EIAndName;
import com.suse.lhw.resourceservere.POJO.output_POJO.MovementModelAndUnits;
import com.suse.lhw.resourceservere.POJO.output_POJO.PackageAndModels;
import com.suse.lhw.resourceservere.POJO.output_POJO.eMoventmodel_units;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ProjectName: health_manage_system
 * @Package: com.suse.lhw.resourceservere.client
 * @ClassName: exersicserverClient
 * @Description: java类作用描述
 * @Author: 李鸿炜
 * @CreateDate: 2020/6/4 3:16
 * @UpdateUser: 更新者
 * @UpdateDate: 2020/6/4 3:16
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
@FeignClient("exersiseserver")
public interface exersicserverClient {
    @RequestMapping("exersiseUser/selectAllDefaultModel")
    public List<MovementModelAndUnits> selectAllDefaultModel(@RequestParam int status);


    @RequestMapping("exersiseUser/selectMoudleById")
    public MovementModelAndUnits selectModelById(@RequestParam int id);

    @RequestMapping("exersiseUser/selectPackageById")
    public PackageAndModels selectPacakgeById(@RequestParam int id);

    @RequestMapping("exersiseUser/selectCollectedModel")
    public List<MovementModelAndUnits> selectCollectedModel();

    @RequestMapping("exersiseUser/selectCollectedPackage")
    public List<PackageAndModels> selectCollectedPackage();

    @RequestMapping("exersiseUser/collectAModel")
    public String collectAModel(@RequestParam int modelId);

    @RequestMapping("exersiseUser/collectAPackage")
    public String collectAPackage(@RequestParam int pacakgeId);

    @RequestMapping("exersiseUser/cancelAModelCollect")
    public String cancelAMdeoCollect(@RequestParam int modelId);

    @RequestMapping("exersiseUser/cancelAPackageCollect")
    public String cancelAPackageCollect(@RequestParam int packageId);

    @RequestMapping("exersiseUser/selectDIYModels")
    public List<MovementModelAndUnits> selectDIYModel();

    @RequestMapping("exersiseUser/selectDIYPackages")
    public List<PackageAndModels> selectDIYPackages();

    @RequestMapping("exersiseUser/uploadAModle")
    public String uploadAModel(@RequestParam int id);

    @RequestMapping("exersiseUser/unuploadAMdle")
    public String unuploadAModel(@RequestParam int modelId);

    @RequestMapping("exersiseUser/uploadAPackage")
    public String uploadAPacakge(@RequestParam int pakcageId);


    @RequestMapping("exersiseUser/addADIYModel")
    public String addADIYModel(@RequestBody eMoventmodel_units a);

    @RequestMapping("exersiseUser/addADIYPackage")
    public String addADIYPackage(@RequestBody PackageAndModels packageAndModels);

    @RequestMapping("exersiseUser/selectUnitsByModelId")
    public MovementModelAndUnits selectUnitsByModelId(@RequestParam int id);

    @RequestMapping("exersiseUser/selectModelsByPackageId")
    public PackageAndModels selectMddelByPackageId(@RequestParam int pacakgeId);

    @PostMapping("exersiseUser/excuteAPackage")
    public String excuteAPacakge(@RequestBody EPackage ePackage);


    @RequestMapping(value = "exersiseUser/excuteAMdoel", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
    public String excuteAMdoel(@RequestBody String json);

    @RequestMapping("exersiseUser/selectMovInstance")
    public List<EIAndName> selectMovInstance();

    @RequestMapping("exersiseUser/deleteMovInstance")
    public int deleteMovInstance(@RequestParam Integer movInstanceId);

    @PostMapping("exersiseUser/selectByNameUseridAndStatus")
    public List<com.suse.lhw.hms.exersiseserver.pojo.out.MovementModelAndUnits> selectByNameUseridAndStatus(@RequestParam(required = false) String name, @RequestParam int status, @RequestParam String userid);

    @ResponseBody
    @RequestMapping("exersiseUser/deleteAMovModel")
    public int deleteAMovModel(@RequestParam Integer movId);
}
